package com.ys.enume.advanced;

/**
 * @EnumName   亚马逊销售伙伴ReportType
 * @Description TODO
 * @Author fxz
 * @Date 2023-11-01 15:45
 */
public enum ReportTypeEnum {
    //广告活动预算表
    SPCAMPAIGNS("SPCAMPAIGNS", 1),
    //广告位报表
    WithPlacement("WithPlacement", 2),
    //广告组投放表
    TARGETING("TARGETING", 3),
    //广告组搜索词表
    SEARCHTERM("SEARCHTERM", 4),
    //广告商品表
    ADVERTISEDPRODUCT("ADVERTISEDPRODUCT", 5),
    //非广告商品表
    PURCHASEDPRODUCT("PURCHASEDPRODUCT", 6),
    ;

    private final String code;

    private final Integer num;

    ReportTypeEnum(String code, Integer num) {
        this.code = code;
        this.num = num;
    }

    public static ReportTypeEnum getEnumByCode(String code) {
        for (ReportTypeEnum marketplaceEnum : values()) {
            if (marketplaceEnum.getCode().equalsIgnoreCase(code)) {
                return marketplaceEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public Integer getNum() {
        return num;
    }

}
